<ng-container [formGroup]="group">

    <fieldset class="k-form-field"
              [formGroupName]="model.id"
              [id]="id"
              [name]="model.name"
              [ngClass]="[getClass('element', 'control'), getClass('grid', 'control')]">

        <legend *ngIf="model.legend" [innerHTML]="model.legend"></legend>

        <ng-container *ngFor="let checkboxModel of model.group;">

            <input type="checkbox" class="k-checkbox"
                   [checked]="checkboxModel.checked"
                   [formControlName]="checkboxModel.id"
                   [id]="getCheckboxId(checkboxModel)"
                   [indeterminate]="checkboxModel.indeterminate"
                   [name]="checkboxModel.name"
                   [ngClass]="getClass('element', 'control', checkboxModel)"
                   [required]="checkboxModel.required"
                   [tabindex]="checkboxModel.tabIndex"
                   [value]="checkboxModel.value"
                   (blur)="onBlur($event)"
                   (change)="onCheckboxChange($event, checkboxModel)"
                   (focus)="onFocus($event)"/>

            <label class="k-checkbox-label" [for]="getCheckboxId(checkboxModel)" [innerHTML]="checkboxModel.label"></label>

        </ng-container>

    </fieldset>

</ng-container>
